package com.rc.saas.tenant.vo.order;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.rc.saas.tenant.model.order.OrderDetail;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author frog
 * @date 2019/11/19
 */
public class OrderDetailResult extends OrderDetail {
    @ExcelProperty(value = "桩群名",index = 0)
    private String stationName;
    @ExcelProperty(value = "桩编号",index = 1)
    private String pileNo;
    @ExcelIgnore
    private String gunNo;
    @ExcelProperty(value = "会员名",index = 4)
    private String nickname;
    @ExcelProperty(value = "手机号",index = 5)
    private String mobile;
    @ExcelIgnore
    private String tenantName;

    @ExcelIgnore
    private BigDecimal totalMoney;

    @ExcelIgnore
    private String hlhtTenantCode;
    @ExcelIgnore
    private String hlhtNickname;
    @ExcelIgnore
    private String hlhtMobile;

    @ExcelProperty(value = "充电时长",index = 11)
    private String lastTime;

    @ExcelProperty(value = "桩厂家",index = 2)
    private String brandName;

    public String getLastTime() {
        Date date = new Date();
        if (this.getEndTime() != null && this.getBeginTime() != null) {
            long l = this.getEndTime().getTime() - this.getBeginTime().getTime();
            SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
            //八个小时的时差
            date.setTime(l - (1000 * 60 * 60 * 8));
            String format = sdf.format(date);
            return format;
        } else {
            return null;
        }

    }

    public String getStationName() {
        return stationName;
    }

    public void setStationName(String stationName) {
        this.stationName = stationName;
    }

    public String getPileNo() {
        return pileNo;
    }

    public void setPileNo(String pileNo) {
        this.pileNo = pileNo;
    }

    public String getGunNo() {
        return gunNo;
    }

    public void setGunNo(String gunNo) {
        this.gunNo = gunNo;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getTenantName() {
        return tenantName;
    }

    public void setTenantName(String tenantName) {
        this.tenantName = tenantName;
    }

    public BigDecimal getTotalMoney() {
        return totalMoney;
    }

    public void setTotalMoney(BigDecimal totalMoney) {
        this.totalMoney = totalMoney;
    }

    public String getHlhtTenantCode() {
        return hlhtTenantCode;
    }

    public void setHlhtTenantCode(String hlhtTenantCode) {
        this.hlhtTenantCode = hlhtTenantCode;
    }

    public String getHlhtNickname() {
        return hlhtNickname;
    }

    public void setHlhtNickname(String hlhtNickname) {
        this.hlhtNickname = hlhtNickname;
    }

    public String getHlhtMobile() {
        return hlhtMobile;
    }

    public void setHlhtMobile(String hlhtMobile) {
        this.hlhtMobile = hlhtMobile;
    }

    public void setLastTime(String lastTime) {
        this.lastTime = lastTime;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }
}
